package com.senon.mvpretrofitrx.mvp.model;

import android.content.Context;

import com.senon.mvpretrofitrx.mvp.api.Api;
import com.senon.mvpretrofitrx.mvp.base.BaseModel;
import com.senon.mvpretrofitrx.mvp.progress.ObserverResponseListener;

import java.util.HashMap;

import io.reactivex.ObservableTransformer;

/**
 * Created by Administrator on 2018/4/18.
 */

public class NewsModel<T> extends BaseModel {

    public void getNewsList(Context context, HashMap<String, String> map, boolean isDialog, boolean cancelable,
                            ObservableTransformer<T, T> transformer, ObserverResponseListener<T> observerResponseListener) {
        //当不需要指定是否由dialog时，可以调用这个方法
//        subscribe(context, Api.getApiService().login(map), observerListener);
        subscribe(context, Api.getJuheService().getNews(map), observerResponseListener, transformer, isDialog, cancelable);
    }

}
